home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
drive_1r
/
foneanno.frm
next >
Wrap
Text File
|
1999-04-11
|
3KB
|
112 lines
VERSION 5.00
Begin VB.Form Form1
Caption = "Phone Annoyer"
ClientHeight = 2310
ClientLeft = 60
ClientTop = 345
ClientWidth = 3570
Icon = "FoneAnnoy.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 115.5
ScaleMode = 2 'Point
ScaleWidth = 178.5
StartUpPosition = 1 'CenterOwner
Begin VB.Timer Timer2
Interval = 455
Left = 480
Top = 720
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = 0
Top = 720
End
Begin VB.TextBox Text1
Alignment = 2 'Center
Height = 285
Left = 1200
TabIndex = 2
Top = 120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "&Begin"
Height = 495
Left = 1320
TabIndex = 0
Top = 720
Width = 975
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "Times:"
Height = 255
Left = 600
TabIndex = 3
Top = 120
Width = 495
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "0"
Height = 195
Left = 1080
TabIndex = 1
Top = 1560
Width = 1425
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Do Until Label1.Caption = Text1.Text
Timer1.Enabled = True
PhoneNumber$ = "123-4567"
Open "COM2:" For Output As #1 'or COM1
Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
Label1.Caption = Label1.Caption + 1
Close #1
Loop
End Sub
Private Sub Form_Resize()
On Error GoTo a
Form1.Height = 2715
Form1.Width = 3690
a:
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyReturn:
Do Until Label1.Caption = Text1.Text
Timer1.Enabled = True
PhoneNumber$ = "123-4567"
Open "COM2:" For Output As #1 'or COM1
Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
Label1.Caption = Label1.Caption + 1
Close #1
Loop
End Select
End Sub
Private Sub Timer1_Timer()
If Label1.Caption = Text1.Text Then
Label1.Caption = "0"
End If
End Sub
Private Sub Timer2_Timer()
Dim a
a = Int(Rnd * 15) + 1
Text1.ForeColor = QBColor(a)
End Sub